/*****************************************************************************
 * Copyright (C) Stacy Curl. All rights reserved.                            *
 * ------------------------------------------------------------------------- *
 * The software in this package is published under the terms of the BSD      *
 * style license a copy of which has been included with this distribution in *
 * the LICENSE.txt file.                                                     *
 *****************************************************************************/
package picounit.features.delegate_verify;

import picounit.DelegateVerify;
import picounit.Registry;
import picounit.Should;
import picounit.Verify;
import picounit.features.Feature;
import picounit.features.base.FeatureRegistry;
import picounit.features.mocking.MockInvocationObserver;
import picounit.mocker.MockControl;
import picounit.mocker.MockFactory;

public class DelegateVerifyFeature implements Feature {
	private final Registry registry;
	private final MockInvocationObserver mockInvocationObserver;

	private final Should should;
	private final MockControl mockControl;
	private final MockFactory mockFactory;
	private final Verify verify;

	public DelegateVerifyFeature(Registry registry, MockInvocationObserver mockInvocationObserver,
		Should should, MockControl mockControl, MockFactory mockFactory, Verify verify) {

		this.registry = registry;
		this.mockInvocationObserver = mockInvocationObserver;

		this.should = should;
		this.mockControl = mockControl;
		this.mockFactory = mockFactory;
		this.verify = verify;
	}

	public void addFeatures(FeatureRegistry featureRegistry) {
		registry.register(DelegateVerify.class, new DefaultDelegateVerify(should, mockControl,
			mockFactory, mockInvocationObserver, verify));
	}
}
